package initialize

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"github.com/flipped-aurora/gin-vue-admin/server/model/card"
	"github.com/flipped-aurora/gin-vue-admin/server/model/cases"
	"github.com/flipped-aurora/gin-vue-admin/server/model/person"
	"github.com/flipped-aurora/gin-vue-admin/server/model/retention_person"
	"github.com/flipped-aurora/gin-vue-admin/server/model/suspect"
)

func bizModel() error {
	db := global.GVA_DB
	err := db.AutoMigrate(cases.CasCases{}, card.CasCards{}, suspect.CasSuspects{}, person.CasPersons{}, retention_person.CasRetentionPersons{})
	if err != nil {
		return err
	}
	return nil
}
